//
//  Day.m
//  B
//
//  Created by Znt on 15/11/7.
//  Copyright © 2015年 wangzhan. All rights reserved.
//

#import "Day.h"
#import "Model4.h"
@implementation Day

- (void)initWithModel {

    
    NSMutableArray *array = [NSMutableArray array];
    for (NSDictionary *dic in _waypoints) {
        Model4 * model = [[Model4 alloc]init];
        [model setValuesForKeysWithDictionary:dic];
        
        if ((NSNull *)model.location  != [NSNull null]) {
            [model setValuesForKeysWithDictionary:model.location];
        }
        if ((NSNull *)model.poi  != [NSNull null]) {
            [model setValuesForKeysWithDictionary:model.poi];
        }
        
        [array addObject:model];
    }
    
    self.waypoints = [NSMutableArray arrayWithArray:array];
    
    
}

@end
